﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace HotelManageSystem.Domain.Entities
{
    /// <summary>
    /// Class Name:     Employee
    /// Author:         Wangzx
    /// Creation Date:  2011-12-29
    /// Description:    
    /// QA:             
    /// -----------------------------------------
    /// </summary>
    public class Employee
    {
        public Employee()
        {
            //对日期初始化防止未赋值报错
            this.Birthday = DateTime.Parse("1989/1/1");
            this.JoinTime = DateTime.Now;
            this.BeginContractDate = DateTime.Parse("1900/1/1");
            this.EndContractDate = DateTime.Parse("1900/1/1");
            this.DimissionDate = DateTime.Now.AddYears(5);
        }
        //基本信息
        [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
        public int ID { get; set; }
        [Required]
        public string Name { get; set; }
        [Required]
        public string Sex { get; set; }

        public int DepartmentId { get; set; }
        public int PostId { get; set; }
        public string Degree { get; set; }

        public DateTime Birthday { get; set; }
        public DateTime JoinTime { get; set; }
        public string Telephone { get; set; }

        public string Identitycard { get; set; }
        public string Gradution { get; set; }
        public string BirthPlace { get; set; }

        public string Nationality { get; set; }
        public string Status { get; set; }
        public string PersentAddress { get; set; }

        public string HomeAddress { get; set; }
        public string Zip { get; set; }
        //试用
        public string EmployeeStatus { get; set; }
        public int ProbationDates { get; set; }
        //合同
        public string ContractType { get; set; }
        public DateTime BeginContractDate { get; set; }
        public DateTime EndContractDate { get; set; }
        public string ContractRemark { get; set; }
        //离职
        public DateTime DimissionDate { get; set; }
        public string DimissionRemark { get; set; }
        //工资
        public decimal BasicWage { get; set; }
        public decimal BasicValue { get; set; }
        public string WageRemark { get; set; }

        public virtual Post Post { get; set; }
        public virtual Department Department { get; set; }
        public virtual ICollection<Attendance> AttendanceCollection { get; set; }
        public virtual ICollection<Wage> WageCollection { get; set; }
    }
}
